import {defineUniRequest} from "@/request";

const uniRequest = defineUniRequest({
    baseURL: '',
    timeout: 6 * 1000
});

uniRequest.interceptors.request.use((config) => {
    // 添加 token
    config.headers.Authorization = ''
    return config;
}, (error) => {
    return Promise.reject(error);
});

uniRequest.interceptors.response.use((response) => {
    console.log(response);
    return {};
}, (error) => {
    return Promise.reject(error);
});

export default uniRequest;